APP_NAME="shop_server"
SERVER_IP="kuboluo.com"


set GOARCH=amd64
go env -w GOOS=linux
go build -o dist/${APP_NAME} *.go
go env -w GOOS=darwin

ssh ${SERVER_IP} "killall -9 ${APP_NAME}"
scp dist/${APP_NAME} ${SERVER_IP}:/www/wwwroot/go_shop/
rsync -av assets public templates root@${SERVER_IP}:/www/wwwroot/go_shop/

# 手机端
cd ../wx/
rsync -av dist/* root@${SERVER_IP}:/www/wwwroot/go_shop/wx/